package com.wteam.dragon.shop.pojo.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.wteam.dragon.system.basebean.bean.BaseBean;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商品分类
 * @Author 陈晓辉
 * @Date 2020/7/2 10:27
 */
@Data
@Table
@TableName
@EqualsAndHashCode(callSuper = true)
public class ProductSort extends BaseBean {
    @IsKey
    @IsNotNull
    @IsAutoIncrement
    @TableId(type = IdType.AUTO)
    @ColumnType(MySqlTypeConstant.BIGINT)
    @Column(comment = "自增id")
    private Long id;

    @IsNotNull
    @Column(comment = "上级编号")
    @ColumnType(MySqlTypeConstant.BIGINT)
    @DefaultValue("0")
    private Long parentId;

    @IsNotNull
    @Column(comment = "商品分类名称")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    private String name;

    @IsNotNull
    @Column(comment = "商品单位")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    private String productUnit;

    @IsNotNull
    @Column(comment = "是否在导航栏显示(0 不在导航栏显示 1 在导航栏进行显示)")
    @ColumnType(MySqlTypeConstant.TINYINT)
    @DefaultValue("0")
    private Integer navStatus;

    @IsNotNull
    @Column(comment = "是否进行显示(0 不进行显示 1 进行显示)")
    @ColumnType(MySqlTypeConstant.TINYINT)
    @DefaultValue("0")
    private Integer showStatus;

    @IsNotNull
    @Column(comment = "排序")
    @ColumnType(MySqlTypeConstant.BIGINT)
    @DefaultValue("1")
    private Integer sort;

    @Column(comment = "图标")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @DefaultValue("1")
    private String icon;

    @Column(comment = "关键词")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    private String keywords;

    @Column(comment = "描述")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    private String description;
}
